﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Icst.Leaflike.Web.controls;
using Icst.Leaflike.Data;

namespace Icst.Leaflike.Web
{
    public partial class book_default : pagebase
    {
        protected sys_book[] _books = null;
        protected Paginator paginator;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int page = this.ParaInt("page", 1);
                int total = 0;
                _books = Book.Instance.get(page, 10, out total);

                paginator.RecordCount = total;
                paginator.Visible = total > 0;
            }
        }
    }
}
